﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Logger.Core
{
    internal class NormalLogger : LoggerBase
    {
        protected override void InputLogger(string message, string fileName)
        {
            string filePath = MvcUrl + fileName;
            string dir = filePath.Substring(0, filePath.LastIndexOf("\\"));
            if (!System.IO.Directory.Exists(dir))
            {
                System.IO.Directory.CreateDirectory(dir);
            }
            using (System.IO.StreamWriter srFile = new System.IO.StreamWriter(filePath, true))
            {
                srFile.WriteLine(message);
                srFile.Close();
                srFile.Dispose();
            }
        }
    }
}
